how to plot a cubic graph